package view;

public class Receive extends Thread {
	private AVReceive2 avReceive;

	public Receive(String argv[]) {
		avReceive = new AVReceive2(argv);
	}

	@Override
	public void run() {
		if (!avReceive.initialize()) {
			System.err.println("Failed to initialize the sessions.");
			System.exit(-1);
		}

		// Check to see if AVReceive2 is done.
		try {
			while (!avReceive.isDone()) {
				Thread.sleep(1000);
			}
		} catch (Exception e) {
		}

		System.err.println("Exiting AVReceive2");
		avReceive.close();
	}
}